package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanLargeDeliveryManagementService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanLargeDeliveryManagementSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanLargeDeliveryManagementSearchResponse;
import org.springframework.data.domain.Page;

public class LoanLargeDeliveryManagementLazyModel extends
        BaseLazyDataModel<LoanLargeDeliveryManagementSearchRequest, LoanLargeDeliveryManagementSearchResponse> {
    private LoanLargeDeliveryManagementService loanLargeDeliveryManagementService = SpringContextHolder.getBean(LoanLargeDeliveryManagementService.class);

    public LoanLargeDeliveryManagementLazyModel(LoanLargeDeliveryManagementSearchRequest loanLargeDeliveryManagementSearchRequest) {
        super(loanLargeDeliveryManagementSearchRequest);
    }

    @Override
    protected Page<LoanLargeDeliveryManagementSearchResponse> doLoad(PageSearcher<LoanLargeDeliveryManagementSearchRequest> pageSearcher) {
        return loanLargeDeliveryManagementService.list(pageSearcher);
    }
}
